﻿#region 命名空间

using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Web.UI.WebControls;
using WinnerCMS.Common;
using WinnerCMS.Data;
using WinnerCMS.Model;
using WinnerCMS.BLL.PageFactory;

#endregion

namespace WinnerCMS.BLL
{
    /// <summary>
    /// 前台使用的Tags类
    /// </summary>
    public partial class TagsManage
    {
        private static readonly TagsDal MyDAL = new TagsDal();

        /// <summary>
        /// 取得内容的标签
        /// </summary>
        /// <param name="contentId"></param>
        /// <returns></returns>
        public IList<Tag> ContentTags(int contentId)
        {
            IList<Tag> list = MyDAL.ContentTags(contentId);

            return list;
        }

        /// <summary>
        /// 绑定指定tag内容
        /// </summary>
        /// <param name="tagId"></param>
        /// <param name="pp"></param>
        /// <returns></returns>
        public IList<Core> BindList(int tagId, PagingParam pp)
        {
            IList<Core> list = MyDAL.BindList(tagId, pp);
            list.ForEach(x => x.Link = StaticFilePath.ContentShowUrl(x));
            return list;
        }
    }
}